Integrand size = 23, antiderivative size = 59 \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {x}{a}-\frac {(a+b)^{3/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a b^{3/2} f}+\frac {\tan (e+f x)}{b f} \]
[Out]
Time = 0.19 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {4226, 2000, 490, 536, 209, 211} \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=-\frac {(a+b)^{3/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a b^{3/2} f}+\frac {x}{a}+\frac {\tan (e+f x)}{b f} \]
[In]
[Out]
Rule 209
Rule 211
Rule 490
Rule 536
Rule 2000
Rule 4226
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right ) \left (a+b \left (1+x^2\right )\right )} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\tan (e+f x)}{b f}-\frac {\text {Subst}\left (\int \frac {a+b+(a+2 b) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{b f} \\ & = \frac {\tan (e+f x)}{b f}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{a f}-\frac {(a+b)^2 \text {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{a b f} \\ & = \frac {x}{a}-\frac {(a+b)^{3/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a b^{3/2} f}+\frac {\tan (e+f x)}{b f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 2.12 (sec) , antiderivative size = 206, normalized size of antiderivative = 3.49 \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {(a+2 b+a \cos (2 (e+f x))) \sec ^2(e+f x) \left ((a+b)^2 \arctan \left (\frac {\sec (f x) (\cos (2 e)-i \sin (2 e)) (-((a+2 b) \sin (f x))+a \sin (2 e+f x))}{2 \sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}\right ) (\cos (2 e)-i \sin (2 e))+\sqrt {a+b} \sqrt {b (i \cos (e)+\sin (e))^4} (b f x+a \sec (e) \sec (e+f x) \sin (f x))\right )}{2 a b \sqrt {a+b} f \left (a+b \sec ^2(e+f x)\right ) \sqrt {b (\cos (e)-i \sin (e))^4}} \]
[In]
[Out]
Time = 1.14 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.22
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (f x +e \right )}{b}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a}+\frac {\left (-a^{2}-2 a b -b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{a b \sqrt {\left (a +b \right ) b}}}{f}\) | \(72\) |
default | \(\frac {\frac {\tan \left (f x +e \right )}{b}+\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a}+\frac {\left (-a^{2}-2 a b -b^{2}\right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{a b \sqrt {\left (a +b \right ) b}}}{f}\) | \(72\) |
risch | \(\frac {x}{a}+\frac {2 i}{f b \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{2 b^{2} f}+\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{2 b f a}-\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{2 b^{2} f}-\frac {\sqrt {-\left (a +b \right ) b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{2 b f a}\) | \(229\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 110 vs. \(2 (51) = 102\).
Time = 0.28 (sec) , antiderivative size = 297, normalized size of antiderivative = 5.03 \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {4 \, b f x \cos \left (f x + e\right ) + {\left (a + b\right )} \sqrt {-\frac {a + b}{b}} \cos \left (f x + e\right ) \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - b^{2} \cos \left (f x + e\right )\right )} \sqrt {-\frac {a + b}{b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) + 4 \, a \sin \left (f x + e\right )}{4 \, a b f \cos \left (f x + e\right )}, \frac {2 \, b f x \cos \left (f x + e\right ) + {\left (a + b\right )} \sqrt {\frac {a + b}{b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {a + b}{b}}}{2 \, {\left (a + b\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \cos \left (f x + e\right ) + 2 \, a \sin \left (f x + e\right )}{2 \, a b f \cos \left (f x + e\right )}\right ] \]
[In]
[Out]
\[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\int \frac {\tan ^{4}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.12 \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {f x + e}{a} + \frac {\tan \left (f x + e\right )}{b} - \frac {{\left (a^{2} + 2 \, a b + b^{2}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{\sqrt {{\left (a + b\right )} b} a b}}{f} \]
[In]
[Out]
none
Time = 0.87 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.47 \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {f x + e}{a} + \frac {\tan \left (f x + e\right )}{b} - \frac {{\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )} {\left (a^{2} + 2 \, a b + b^{2}\right )}}{\sqrt {a b + b^{2}} a b}}{f} \]
[In]
[Out]
Time = 19.16 (sec) , antiderivative size = 410, normalized size of antiderivative = 6.95 \[ \int \frac {\tan ^4(e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\mathrm {atan}\left (\frac {8\,a^2\,\mathrm {tan}\left (e+f\,x\right )}{12\,a\,b+8\,a^2+6\,b^2+\frac {2\,a^3}{b}}+\frac {2\,a^3\,\mathrm {tan}\left (e+f\,x\right )}{2\,a^3+8\,a^2\,b+12\,a\,b^2+6\,b^3}+\frac {6\,b^2\,\mathrm {tan}\left (e+f\,x\right )}{12\,a\,b+8\,a^2+6\,b^2+\frac {2\,a^3}{b}}+\frac {12\,a\,b\,\mathrm {tan}\left (e+f\,x\right )}{12\,a\,b+8\,a^2+6\,b^2+\frac {2\,a^3}{b}}\right )}{a\,f}+\frac {\mathrm {tan}\left (e+f\,x\right )}{b\,f}+\frac {\mathrm {atanh}\left (\frac {6\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^3\,b^3-3\,a^2\,b^4-3\,a\,b^5-b^6}}{18\,a\,b^2+20\,a^2\,b+10\,a^3+6\,b^3+\frac {2\,a^4}{b}}+\frac {6\,a\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^3\,b^3-3\,a^2\,b^4-3\,a\,b^5-b^6}}{2\,a^4+10\,a^3\,b+20\,a^2\,b^2+18\,a\,b^3+6\,b^4}+\frac {2\,a^2\,\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^3\,b^3-3\,a^2\,b^4-3\,a\,b^5-b^6}}{2\,a^4\,b+10\,a^3\,b^2+20\,a^2\,b^3+18\,a\,b^4+6\,b^5}\right )\,\sqrt {-b^3\,{\left (a+b\right )}^3}}{a\,b^3\,f} \]
[In]
[Out]